package stv5;

import java.io.IOException;
import java.net.ServerSocket;

import stv5.abstracted.Connection;
import stv5.abstracted.ConnectionAcceptor;

public class STAcceptor implements ConnectionAcceptor {
	protected ServerSocket serverskt;
	
	public STAcceptor(int port) throws IOException {
		serverskt = new ServerSocket(port);
	}

	@Override
	public Connection accept() {
		try {
			return new STConnection( serverskt.accept() );
		} catch (IOException e) {
			return null;
		}
	}


}
